<template>
  <!-- 在app组件注册使用 -->
  <div>
    <van-tabbar v-model="active" route>
      <van-tabbar-item name="home" icon="home-o" to="/">首页</van-tabbar-item>
      <van-tabbar-item name="search" icon="search" to="/search">搜索</van-tabbar-item>
      <van-tabbar-item name="setting" icon="user-o" to="/user">个人中心</van-tabbar-item>
      <van-tabbar-item name="collect" icon="like-o" to="/collect">收藏</van-tabbar-item>
  </van-tabbar>

  </div>
</template>

<script>
import { ref } from 'vue'

export default {
  name: 'TabBar',
  setup () {
    const active = ref('home')
    return { active }
  }
}
</script>

<style lang="less" scoped>

</style>
